/**
 * Created by Administrator on 2015/12/4.
 */
/** 监听子进程退出 事件 */
var spawn = require("child_process").spawn;
var child = spawn("ls  ", ["-l"]);

child.stdout.on("data", function (data) {
    console.log(data);
});

child.stdout.on("exit", function (data) {
    console.log("process is exit");
});